<?
require_once('dpvr.vars.php');

if (!isset($log_fp)) {
  // make the logs world writable
  $logfile_name = $config['hellavcr_dir'].'logs/hellavcr.'.date('m.d.Y').'.log';
  
  $umask = umask();
  umask(0);
  $log_fp = fopen($logfile_name, 'a+');
  umask($umask);
}  

function print_log($message) {
  global $log_fp, $configData, $silent;
  
  $line = date($configData['logging']['date_format']).' '.$message."\n";
  
  if (!$silent)
    print $line;

  fwrite($log_fp, $line);

}

?>